package com.seaboxdata.dao;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.seaboxdata.entity.DataMonitorConfig;
import com.seaboxdata.entity.DataMonitorResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * ${comments}
 * 
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-07-06 15:20:44
 */
@Mapper
public interface DataMonitorResultDao extends BaseMapper<DataMonitorResult> {
    @DS("queuing")
    DataMonitorResult getResult(@Param("dataMonitorConig") DataMonitorConfig dataMonitorConig);
    @DS("queuing")
    int getTotalCount(@Param("dataMonitorConig") DataMonitorConfig dataMonitorConfig);
    List<DataMonitorResult> getLatestResults(@Param("beginDate") Date beginDate, @Param("endDate") Date endDate);
}
